#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QPointF>
#include <QVector>
#include "logindialog.h"
#include "marketwindow.h"
#include "analysiswindow.h"
#include "bidwindow.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_actionUserClient_triggered();
    void on_actionPowerSupplier_triggered();
    void on_actionTradingMarket_triggered();
    void on_actionDataAnalysis_triggered();
    void on_actionExit_triggered();

    void on_action_triggered();

private:
    Ui::MainWindow *ui;
    MarketWindow *marketWindow;
    AnalysisWindow *analysisWindow;
    // 存储供电端和用户端的竞价数据（电价和电量）
    QVector<PriceQuantity> supplierBidData;
    QVector<PriceQuantity> consumerBidData;
    
    // 存储交点坐标
    QPointF intersectionPoint;
};
#endif // MAINWINDOW_H
